package ckw.database.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import core.database.AbstractEntity;

@Entity
@Table(name = "votes")
public class Vote extends AbstractEntity {

	@ManyToOne
	@JoinColumn(name = "election")
	private Election election;

	@Column(name = "card", length = 32672)
	private String card;

	@Column(name = "rkwLocatorURI")
	private String rkwLocatorURI;

	@Column(name = "parsed")
	private Boolean parsed = false;

	public Vote() {
		this.election = null;
		this.card = null;
		this.rkwLocatorURI = null;
		this.parsed = false;
	}

	public Vote(String card, String rkwLocatorUri) {
		this.card = card;
		this.rkwLocatorURI = rkwLocatorUri;
	}

	public Election getElection() {
		return election;
	}

	public void setElection(Election election) {
		this.election = election;
	}

	public String getCard() {
		return card;
	}

	public void setCard(String card) {
		this.card = card;
	}

	public String getRkwLocatorURI() {
		return rkwLocatorURI;
	}

	public void setRkwLocatorURI(String rkwLocatorURI) {
		this.rkwLocatorURI = rkwLocatorURI;
	}

	public Boolean getParsed() {
		return parsed;
	}

	public void setParsed(Boolean parsed) {
		this.parsed = parsed;
	}
}
